package com.wxh.rsa;

import java.security.NoSuchAlgorithmException;

/**
 * @ClassName: KeyGenerator
 * @Description:
 * @Author wxh
 * @Date: 2020/5/9 17:39
 * @Version V1.0.0
 * @Since 1.8
 */
public class KeyGenerator {
    public static KeyPair generateKeyPair(KeyFormat format)
            throws NoSuchAlgorithmException {
        KeyPair keyPair = new KeyPair(format);

        return keyPair;
    }

    public static KeyPair generateKeyPair()
            throws NoSuchAlgorithmException {
        return generateKeyPair(KeyFormat.ASN);
    }
}
